package com.migu.contacts.util;

import java.util.List;

public class EduUtil {
    public static String getName(int id) {
        if (id == 0) {
            return null;
        }
        return list.get(id - 1);
    }

    static List<String> list = List.of("大专", "本科", "硕士", "博士");

    public static int getId(String groupName) {
        for (int i = 0; i < list.size(); i++) {
            if (list.get(i).equals(groupName)) {
                return i + 1;
            }
        }
        return -1;
    }

}
